package com.zhijian.medical.service;


import com.zhijian.medical.entity.dto.DscScoreDto;
import com.zhijian.medical.entity.po.AssessmentDscPaperPerson;
import com.zhijian.medical.entity.vo.request.AssessmentDscPaperPersonSearchVo;
import com.zhijian.medical.entity.vo.response.AssessmentDscPaperPersonVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 考核-数字切片考试提交结果 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2023-02-03 22:09:21
 */
public interface AssessmentDscPaperPersonService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    AssessmentDscPaperPerson selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    AssessmentDscPaperPersonVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据考核id进行删除
     *
     * @param assessmentId
     */
    void deleteByAssessmentId(Long assessmentId);

    /**
     * 新增
     *
     * @param assessmentDscPaperPerson
     * @return
     */
    Long insert(AssessmentDscPaperPerson assessmentDscPaperPerson);

    /**
     * 更改
     *
     * @param assessmentDscPaperPerson
     * @return
     */
    boolean update(AssessmentDscPaperPerson assessmentDscPaperPerson);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(AssessmentDscPaperPerson record);

    /**
     * 总数
     *
     * @param assessmentDscPaperPersonSearchVo
     * @return
     */
    Integer count(AssessmentDscPaperPersonSearchVo assessmentDscPaperPersonSearchVo);

    /**
     * 列表
     *
     * @param assessmentDscPaperPersonSearchVo
     * @return
     */
    List<AssessmentDscPaperPersonVo> selectList(AssessmentDscPaperPersonSearchVo assessmentDscPaperPersonSearchVo);

    /**
     * 根据考核id、做卷人用户id、病例id进行查找
     *
     * @param assessmentId
     * @param personId
     * @param caseId
     * @return
     */
    AssessmentDscPaperPersonVo selectByAssessmentIdAndPersonIdAndCaseId(Long assessmentId, Long personId, Long caseId);

    /**
     * 分页查询
     *
     * @param assessmentDscPaperPersonSearchVo
     * @return
     */
    Page<AssessmentDscPaperPersonVo> selectPage(AssessmentDscPaperPersonSearchVo assessmentDscPaperPersonSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<AssessmentDscPaperPerson> entities);

    /**
     * 打分进行的修改表操作
     *
     * @param dscScoreDto
     * @return
     */
    boolean score(DscScoreDto dscScoreDto);
}